package net.blogways.ordermgr.mail.entity;

import org.apache.commons.mail.EmailAttachment;

import java.util.HashMap;
import java.util.Map;

public class Mail {
  /**
   *
   */
  private static final long serialVersionUID = 1L;

  // 邮件编码
  public static final String ENCODEING = "UTF-8";

  private String copySomeone;

  //服务器地址
  private String host;

  //服务器端口号
  private String portNumber;

  // 发件人的邮箱
  private String sender;

  // 收件人的邮箱
  private String receiver;

  // 发件人昵称
  private String name;

  // 账号
  private String usercode;

  //密码
  private String password;

  //主题
  private String subject;

  //信息内容
  private String message;

  //异常信息
  private String execption;
  //邮件处理状态
  private String dealState;

  //发送公告时分页数
  private Integer limitNumber;

  //邮件附件
  private EmailAttachment attachment;

  private Map mailMap = new HashMap();

  public Mail(){

  }

  public EmailAttachment getAttachment() {
    return attachment;
  }

  public void setAttachment(EmailAttachment attachment) {
    this.attachment = attachment;
    mailMap.put("attachment", attachment);
  }

  public String getHost() {
    return host;
  }

  public void setHost(String host) {
    this.host = host;
  }

  public String getPortNumber() {
    return portNumber;
  }

  public void setPortNumber(String portNumber) {
    this.portNumber = portNumber;
  }

  public String getSender() {
    return sender;
  }

  public void setSender(String sender) {
    this.sender = sender;
    mailMap.put("sender", sender);
  }

  public String getReceiver() {
    return receiver;
  }

  public void setReceiver(String receiver) {
    this.receiver = receiver;
    mailMap.put("receiver", receiver);
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
    mailMap.put("name", name);
  }

  public String getUsercode() {
    return usercode;
  }

  public void setUsercode(String usercode) {
    this.usercode = usercode;
    mailMap.put("usercode", usercode);
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
    mailMap.put("password", password);
  }

  public String getSubject() {
    return subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
    mailMap.put("subject", subject);
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message){
    this.message = message;
    mailMap.put("message", message);
  }

  public String getCopySomeone() {
    return copySomeone;
  }

  public void setCopySomeone(String copySomeone) {
    this.copySomeone = copySomeone;
    mailMap.put("copySomeone", copySomeone);
  }

  public String getExecption() {
    return execption;
  }

  public void setExecption(String execption) {
    this.execption = execption;
    mailMap.put("execption", execption);
  }

  public String getDealState() {
    return dealState;
  }

  public void setDealState(String dealState) {
    this.dealState = dealState;
    mailMap.put("dealState", dealState);
  }

  public Integer getLimitNumber() {
    return limitNumber;
  }

  public void setLimitNumber(Integer limitNumber) {
    this.limitNumber = limitNumber;
    mailMap.put("limitNumber", limitNumber);
  }

  public Map getMailMap() {
    return mailMap;
  }

  public void setMailMap(Map mailMap) {
    this.mailMap = mailMap;
  }
}
